import axios from '@/functions/request';
function addItem1(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysuser/doSave",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function getList(){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysorgan/doGetSysOrganObject",{}).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function getUserByUserId(params){
    return new Promise((resolve, reject)=>{
        axios.formPost("/api/auth/sysuser/doGetUser",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}

function addItem(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysorgan/doSaveSysOrgan",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function deleteItem(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysorgan/doDelSysOrgan",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function editItem(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysorgan/doModSysOrgan",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })

}
function getUserByOrganCode(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysuser/doGetListWithOrganId",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })

}
function editItem3(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysUserOrgan/doModSysUserOrgan",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })

}



export {
    getList,
    deleteItem,
    addItem,
    editItem,
    addItem1,
    getUserByUserId,
    editItem3,
    getUserByOrganCode
}